<template>
  <h1>质量管理</h1>

  <el-card style="margin:20px;width: 1000px;">
    <el-table :data="checkArr">
      <el-table-column type="index" label="序号" width="80" align="center"/>
      <el-table-column prop="projectName" label="项目名称" align="center"/>
      <el-table-column prop="inspectionLocation" label="检查部位" align="center"/>
      <el-table-column prop="area" label="区域" align="center"/>
      <el-table-column prop="inspector" label="检查人" align="center"/>
      <el-table-column prop="applicant" label="责任人" align="center"/>
      <el-table-column prop="description" label="描述" align="center"/>
      <el-table-column prop="inspectionFrequency" label="检查频率" align="center"/>
      <el-table-column prop="status" label="状态" align="center" />
      <el-table-column prop="inspectionTimeLimit" label="检查时限" align="center" />
      <el-table-column prop="effectiveDate" label="生效日期" align="center" />
      <el-table-column prop="reInspector" label="复查人" align="center" />
      <el-table-column prop="inspectionStatus" label="检查状态" align="center" />
      <el-table-column prop="statusDetails" label="状态详情" align="center" />
      <el-table-column label="操作" align="center">
        <template #default="scope">
          <el-button link type="primary" size="small" @click="updateCheck(scope.row.id)">编辑</el-button>
          <el-button link type="primary" size="small" @click="deleteCheck(scope.row.id)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script setup>

import {onMounted, ref} from "vue";
import axios from "axios";
import {ElMessage} from "element-plus";

const checkArr = ref([]);
onMounted(() => {
  //getCheck();
})
const getCheck = () => {
    let data = {};
    axios.get(BASE_URL+'/v1/quality/check/select').then((res) => {
      if (res.data.code === 2000) {
        checkArr.value = res.data.data;
      } else {
        ElMessage.error(res.data.message);
      }
    })
}
const updateCheck = (id) => {
  /*
  * 编辑
   */
}
const deleteCheck = (id) => {
  /*
  * 删除
   */
}

</script>



<style scoped>

</style>